import { get, post } from '@/js/request'

export default {
    data() {
        return {
            url: {
                list: '/list'
            },
            query: {
                pageNo: 1,
                pageSize: 10
            },
            resultData: {}
        }
    },
    beforeMount() {
        this.getList();
    },
    methods: {
        get,
        post,
        getList() {
            post(this.url.list, this.query).then(res => {
                this.resultData = res.result.records;
                this.query.total = res.result.total;
                this.query.pageSize = res.result.size;
                this.query.pageNo = res.result.current;
            });
        }
    },
}